function m2_mean = model_m2_mean_1D(b,time,parameters)
nv = b(1);
sigma2 = b(2)*b(1);

mode = parameters(1);
L_0 = parameters(2);  % Domain size, unit site
a    = parameters(3);
freq = parameters(4);
dx   = parameters(5); % Aggregation length, unit site
l = L_0/dx;           % Lattice size, unit site

m2_mean = zeros(size(time));
for i = 1:length(time)
    m2 = 0.0;
    for n = 1:mode
        if n==0
            K = 8*sin(pi*n/l)^2/(L_0*dx*dx);
        else
            K = 4*sin(pi*n/l)^2/(L_0*dx*dx);
        end
        lambda = -4.0*nv*(pi^2)*(n^2)/(L_0^2);
        temp1 = exp(2*lambda*time(i));
        m2 = m2+2*K*sigma2*(temp1-1)/(2*lambda);
    end
    m2_mean(i) = m2;
end

end